

#ifndef   __FIFO_BUFFER__H__
#define   __FIFO_BUFFER__H__

#define   ENTRY_MESSAGE_READ				0
#define   ENTRY_MESSAGE_SET_AS_READ		1

typedef struct _FIFO_INF
{
		int pWrite;
		int pRead;
		int BufferSize;
		int AvailabelEntryCount;
		unsigned char* FifoBuffer;
}FIFO_INF;


void Fifo_Init(FIFO_INF* fi, unsigned char* FifoBuffer, unsigned char BufferSize);
unsigned char Fifo_AvailableToRead(FIFO_INF* fi);
unsigned char Fifo_AvailableToWrite(FIFO_INF* fi);
int Fifo_Write(FIFO_INF* fi, unsigned char* DataBuffer, unsigned char ByteCount);
unsigned char Fifo_Read(FIFO_INF* fi, unsigned char* DataBuffer);
unsigned char Fifo_nRead(FIFO_INF* fi, unsigned char* DataBuffer, unsigned char ByteToRead);

#endif


